<form id="pagerForm" method="post" action="{{$smarty.const.__URL__|url}}">
	<input type="hidden" name="pageNum" value="{{$page.pageNum}}" />
	<input type="hidden" name="numPerPage" value="{{$page.numPerPage}}" />
	<input type="hidden" name="orderField" value="{{$page.orderField}}" />
	<input type="hidden" name="orderDirection" value="{{$page.orderDirection}}" />
	<input type="hidden" name="name" value="{{$smarty.post.name}}" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="{{$smarty.const.__URL__|url}}" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					投票名称：<input type="name" name="name" value="{{$smarty.post.name}}" />
				</td>
				<td>
					<div class="subBar">
						<ul>
							<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
							<li><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="return navTabSearch(this);">刷新</button></div></div></li>
						</ul>
					</div>
				</td>
			</tr>
		</table>
		
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{{$smarty.const.__URL__&a=add|url}}" target="dialog" width="800" height="500"><span>添加</span></a></li>
			<li><a class="edit" href="{{$smarty.const.__URL__&a=update&id={list_id}|url}}" target="dialog" width="800" height="500"><span>修改</span></a></li>
			<li><a class="delete" href="{{$smarty.const.__URL__&a=delete|url}}" target="selectedTodo" rel="ids" postType="string" title="确实要删除这些记录吗?"><span>批量删除</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="{{$smarty.const.__URL__&a=export|url}}"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="114">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th orderField="id" class="{{$page.orderDirection}}">投票ID</th>
				<th>投票名称</th>
				<th>开始时间</th>
				<th>结束时间</th>
				<th>投票总数</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			{{section name=loop loop=$list}}
			<tr target="list_id" rel="{{$list[loop].id}}">
				<td><input name="ids" value="{{$list[loop].id}}" type="checkbox"></td>
				<td>{{$list[loop].id}}</td>
				<td>{{$list[loop].name}}</td>
				<td>{{$list[loop].start_time|date_format:'%Y-%m-%d'}}</td>
				<td>{{$list[loop].end_time|date_format:'%Y-%m-%d'}}</td>
				<td>{{$list[loop].total_count}}</td>
				<td><font color="{{if $list[loop].is_enable}}red{{else}}green{{/if}}">{{$list[loop].state}}</font></td>
				<td>
					<a href="{{$smarty.const.__URL__&a=update&id=$list[loop].id|url}}" class="btnEdit" target="dialog" width="800" height="500" title="编辑">编辑</a>
					<a href="{{$smarty.const.__URL__&a=getCode&id=$list[loop].id|url}}" class="btnView" target="dialog" width="800" height="500" title="获取代码">获取代码</a>
					<a href="{{$smarty.const.__PUB__index.php?c=vote&a=view&id=$list[loop].id|url}}" class="btnLook" target="_blank" title="投票结果">投票结果</a>
					<a target="ajaxTodo" href="{{$smarty.const.__URL__&a=delete&ids=$list[loop].id|url}}" class="btnDel" title="确定要删除吗?">删除</a>
				</td>
			</tr>
		    {{/section}}
		</tbody>
	</table>
	{{include file="Include/page.html"}}
</div>
